function grafikkomposisiagama(jenis, urljson, target, judul, judulsumbux, baseurl, satkerid) {
    $.getJSON(urljson, function(hasil) {
        $('#' + target).highcharts({
            chart: {
                plotShadow: true,
                type: 'column'
            },
            title: {
                text: judul
            },
            tooltip: {formatter: function() {
                    var nama = this.series.name.split("|");
                    return"<b>" + nama[0] + "</b>: " + this.y + " "
                }},
            plotOptions: {
                series: {
                    cursor: 'pointer',
                    point: {
                        events: {
                            click: function() {
                                var nama = this.series.name.split("|");
                                tampildetaildata(jenis, nama[1], baseurl, satkerid);
                            }
                        }
                    },
                    marker: {
                        lineWidth: 1
                    }
                }
            },
            xAxis: {labels:
                        {
                            enabled: false
                        }, title: {text: judulsumbux}},
            yAxis: {
                min: 0,
                title: {
                    text: 'Jumlah'
                }
            },
            legend: {backgroundColor: "#FFFFFF", labelFormatter: function() {
                    var nama = this.name.split("|");
                    return'<span style="color:{color}">' + nama[0] + "</span>: " + this.yData[0] + " <br/>"
                }},
            series: hasil
        });
    });
}

function tampildetaildata(jenis, idagama, baseurl, satkerid) {
    $("#idagama").val(idagama);
    var a_href = $('#various1').attr('href');
    if (jenis == 1) {
        // agama
        $("#various1").attr('href', baseurl + "index.php/personil/personildata/popuppegbysatkeragama/" + satkerid + "/" + idagama);
    } else if (jenis == 2) {
        //eselon
        $("#various1").attr('href', baseurl + "index.php/personil/personildata/popuppegbysatkereselon/" + satkerid + "/" + idagama);
    }
    else if (jenis == 3) {
        //jenis jabatan
        $("#various1").attr('href', baseurl + "index.php/personil/personildata/popuppegbysatkerjabatan/" + satkerid + "/" + idagama);
    }else if (jenis == 4) {
        //sex
        $("#various1").attr('href', baseurl + "index.php/personil/personildata/popuppegbysatkerjeniskelamin/" + satkerid + "/" + idagama);
    }else if (jenis == 5) {
        //pangkat
        $("#various1").attr('href', baseurl + "index.php/personil/personildata/popuppegbysatkerpangkat/" + satkerid + "/" + idagama);
    }else if (jenis == 6) {
        //pendidikan
        $("#various1").attr('href', baseurl + "index.php/personil/personildata/popuppegbysatkerpendidikan/" + satkerid + "/" + idagama);
    }else if (jenis == 7) {
        //pendidikan
        $("#various1").attr('href', baseurl + "index.php/personil/personildata/popuppegbysatkerusia/" + satkerid + "/" + idagama);
    }
    $("#various1").click();




}